package com.buaa.hyf.activity;

import android.app.Activity;

/**
 * Created by Jeson on 2016/4/21.
 */
public class Globals {

    public static int SCREEN_WIDTH;
    public static int SCREEN_HEIGHT;

    //每行写的字的个数
    public static int LINT_CHAR_COUNT=20;
    //字符间距
    public static int CHAR_SEP = 2;
    //行间距
    public static int LINT_SEP = 2;
    //页边距
    public static int PAGE_SEP = 2;

    //字符大小
    public static int CHAR_SIZE;
    //行数
    public static int LINE_COUNT;

    public static void init(Activity a){
        SCREEN_WIDTH = a.getWindowManager().getDefaultDisplay().getWidth();
        SCREEN_HEIGHT = a.getWindowManager().getDefaultDisplay().getHeight();

        CHAR_SIZE= (SCREEN_WIDTH-2*PAGE_SEP-(LINT_CHAR_COUNT-1)*CHAR_SEP)/LINT_CHAR_COUNT;
        LINE_COUNT = SCREEN_HEIGHT*4/5/(CHAR_SIZE+LINT_SEP);
    }



}
